
<%@page import="com.dts.project.dao.MobileCardDetailsDao"%>
<%@page import="com.yourcompany.struts.form.MobileCardSalesForm"%>
<%@page import="com.dts.core.util.DateWrapper"%>
<%@page import="com.dts.project.dao.MobileCardSalesDao"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/transitional.dtd">
<html>
<head>
<style>
body,td,th {
	color: #B00606;
	font-family: Verdana, Arial, Helvetica, sans-serif;
}
.style9 {color: #FFFFFF}
body {
	background-color: #003333;
}
</style>

<title>My Village</title>
<script type="text/javascript" src="scripts/moveclock.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /></head>
<body>
<table width="750" align="center" bgcolor="#B00606">
<tr><td>
<img src="images/epostoffice.gif" width="780"></td>
</tr>
<tr>
   <td bgcolor="#E16A00"><jsp:include page="UserOptions.jsp"/>
   </td></tr>
<tr><td>
<%--<div align="center">--%>
<%--<table bgcolor="#B00606" width="750" align="center">--%>
<%--<tr>--%>
<%--   <td><jsp:include page="Template.html"/></td></tr></table></div>--%>
<div align="center">
<table bgcolor="#B00606" width="770" align="center" height="70">
<tr>
   <td>
   <marquee><font color="#ECEDF3"><h1>WELCOME TO THE Admin Site</h1></marquee>
<marquee> <img src="images/IndianStamps.gif" height="100"><img src="images/ist2_1276217-vintage-indian-stamps-ephemera.jpg" height="100"><img src="images/images.jpeg" height="100"><img src="images/images1.jpeg" height="100"><img src="images/stamp price.jpg" height="100"><img src="images/2007-03-28-sw-stamps.jpg" height="100"><img src="images/6a00d83452795369e200e5506182958834-500wi.jpg" height="100"><img src="images/stamp-avocet.JPG" height="100"></marquee>
   <p align="center">
   <center>
    
    <font color="white"><b>
    <%
    
String target="Success1.jsp?status=Invalid Transaction";
    int creditcardnumber=Integer.parseInt(request.getParameter("Creditcardno"));
    int amount=Integer.parseInt(request.getParameter("amount"));
    int cardid=Integer.parseInt(request.getParameter("cardid"));
 int operatorid=Integer.parseInt(request.getParameter("operatorid"));
 int cardnumber=new MobileCardDetailsDao().getCardNumber(cardid);
    int userid=((Integer)session.getAttribute("user")).intValue();
     MobileCardSalesForm form=new MobileCardSalesForm();
     form.setCardId(cardid);
     form.setOperatorId(operatorid);
     form.setUserId(userid);
     form.setSaleDate(DateWrapper.parseDate(new java.util.Date()));
     MobileCardSalesDao adao=new MobileCardSalesDao();
     boolean flag1=adao.getCardDetails(creditcardnumber,amount);
     if(flag1)
     {
    boolean flag2= new  MobileCardSalesDao().updateCardStatus(cardid);
    if(flag2)
    {
     boolean flag=adao.insertMobileCardSales(form);
     if(flag)
     {
     target="Success1.jsp?status=Your card number is    "+cardnumber;
     }
     }
     }
     RequestDispatcher rd=request.getRequestDispatcher(target);
     rd.forward(request,response);
     %>
    </b></font>
    
    
    
     
     </center>
    
     
     
     </td></tr></table>
          <p>&nbsp;</p>
               <p>&nbsp;</p>
                    <p>&nbsp;</p>
                         
           <p>&nbsp;</p>
               <p>&nbsp;</p>
                    <p>&nbsp;</p>
                         
           <p>&nbsp;</p>
             
                         
                              
     <p>&nbsp;</p></div>


</body></html>